<?php
require $this->__RAD__ . 'component/global/head.php';
?>
<body>
<?php
require $this->__RAD__ . 'component/global/header.php';
require $this->__RAD__ . 'component/global/headerEnd.php';
?>
<div class="public-menu">
    <div class="menu-list">
        <ul>
            <li data-src="图片类型：">
                <?php
                if ($this->type) :
                    foreach ($this->type as $val) :
                        ?>
                        <a href="/product/list/<?= $val->product_fication_id ?>/<?= $this->currentNavStyle ?>/<?= $this->currentNavScene ?>"><?= $val->fication_name ?></a>
                        <?php
                    endforeach;
                endif;
                ?>
                <a href="javascript:;" class="zk">展开筛选</a>
            </li>
            <li data-src="图片风格：">
                <?php
                if ($this->style) :
                    foreach ($this->style as $val) :
                        ?>
                        <a href="/product/list/<?= $this->currentNavType ?>/<?= $val->style_id ?>/<?= $this->currentNavScene ?>"><?= $val->fication_name ?></a>
                        <?php
                    endforeach;
                endif;
                ?>
            </li>
            <li data-src="图片场景：">
                <?php
                if ($this->scene) :
                    foreach ($this->scene as $val) :
                        ?>
                        <a href="/product/list/<?= $this->currentNavType ?>/<?= $this->currentNavStyle ?>/<?= $val->scene_id ?>"><?= $val->fication_name ?></a>
                        <?php
                    endforeach;
                endif;
                ?>
            </li>
        </ul>

    </div>
</div>
<hr/>
<!--搜索end-->
<div class="container">
    <div class="waterfall">
        <?php
        if ($this->product) :
            foreach ($this->product as $val) :
                ?>
                <ul class="list-group">
                    <li class="list-group-item">
                        <a href="/product/detail/<?= $val->img_sn ?>">
                            <img src="<?= $this->__CDN__ ?>pics/s/<?= $val->product_img ?>" />
                        </a>
                    </li>
                    <li class="list-group-item">
                        <div class="media clearfix">
                            <input type="hidden" class="class-synopsis" value="<?= $val->synopsis ?>">
                            <span>上传时间：<?= date('Y年m月d日', $val->upload_date) ?></span>
                        </div>
                    </li>
                </ul>
                <?php
            endforeach;
        endif;
        ?>
    </div>
</div>

<?php
require $this->__RAD__ . 'component/global/collection.php';
?>
<?php
require $this->__RAD__ . 'component/global/footer.php';
?>
<script>
    $(function () {
        //展开收缩
        $('.zk').click(function () {
            if($(this).hasClass('ss')){
                $(this).removeClass('ss').text("展开筛选");
                $(this).parents('ul').css('height','45px')
            }
            else{
                $(this).addClass('ss').text("收起筛选");
                $(this).parents('ul').css('height','auto')
            }
        })
    })
</script>
</body>
</html>
